﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001C4 RID: 452
	public class THiveMetaStoreCheck : TCustomSqlStatement
	{
		// Token: 0x06000F13 RID: 3859 RVA: 0x0030B048 File Offset: 0x00309248
		public THiveMetaStoreCheck(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveMetaStoreCheck;
		}

		// Token: 0x170002C7 RID: 711
		// (get) Token: 0x06000F14 RID: 3860 RVA: 0x0030B05C File Offset: 0x0030925C
		// (set) Token: 0x06000F15 RID: 3861 RVA: 0x0030B064 File Offset: 0x00309264
		public virtual List<TPartitionExtensionClause> PartitionSpecList
		{
			get
			{
				return this.partitionSpecList;
			}
			set
			{
				this.partitionSpecList = value;
			}
		}

		// Token: 0x170002C8 RID: 712
		// (get) Token: 0x06000F16 RID: 3862 RVA: 0x0030B06D File Offset: 0x0030926D
		// (set) Token: 0x06000F17 RID: 3863 RVA: 0x0030B075 File Offset: 0x00309275
		public virtual bool Repair
		{
			get
			{
				return this.repair;
			}
			set
			{
				this.repair = value;
			}
		}

		// Token: 0x170002C9 RID: 713
		// (get) Token: 0x06000F18 RID: 3864 RVA: 0x0030B07E File Offset: 0x0030927E
		// (set) Token: 0x06000F19 RID: 3865 RVA: 0x0030B086 File Offset: 0x00309286
		public virtual TObjectName TableName
		{
			get
			{
				return this.tableName;
			}
			set
			{
				this.tableName = value;
			}
		}

		// Token: 0x06000F1A RID: 3866 RVA: 0x0030B090 File Offset: 0x00309290
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			THiveMetastoreCheckSqlNode thiveMetastoreCheckSqlNode = (THiveMetastoreCheckSqlNode)this.rootNode;
			this.repair = thiveMetastoreCheckSqlNode.Repair;
			this.tableName = thiveMetastoreCheckSqlNode.TableName;
			this.partitionSpecList = thiveMetastoreCheckSqlNode.PartitionSpecList;
			return 0;
		}

		// Token: 0x06000F1B RID: 3867 RVA: 0x0030B0E0 File Offset: 0x003092E0
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000F1C RID: 3868 RVA: 0x0030B0F0 File Offset: 0x003092F0
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.partitionSpecList != null)
			{
				foreach (TPartitionExtensionClause tpartitionExtensionClause in this.partitionSpecList)
				{
					tpartitionExtensionClause.acceptChildren(v);
				}
			}
			v.postVisit(this);
		}

		// Token: 0x04001359 RID: 4953
		private bool repair;

		// Token: 0x0400135A RID: 4954
		private TObjectName tableName;

		// Token: 0x0400135B RID: 4955
		private List<TPartitionExtensionClause> partitionSpecList;
	}
}
